namespace Framework.UI
{
	public partial class RoomFrame : UIFrame
	{
		protected override string ActivedScene => "scene_room";

		void OnBtnCloseClicked()
		{
			//Add Your Code Here
			Net.SendReqLeaveRoomMapMessage();
		}

        protected override void OnFrameOpen()
        {
			EventDispatchManager.Instance.AddEvent(EventId.Game.EVENT_LEAVE_ROOM_SUCCEED, OnEventLeavedRoom);
        }

		void OnEventLeavedRoom(IEventArgv eventArgv)
        {
			YooAsset.YooAssets.LoadSceneAsync("scene_actor_show");
        }

        protected override void OnFrameClose()
        {
			EventDispatchManager.Instance.RemoveEvent(EventId.Game.EVENT_LEAVE_ROOM_SUCCEED, OnEventLeavedRoom);
		}

        void OnBtnStartClicked()
		{
			//Add Your Code Here
		}
	}
}
